<!DOCTYPE html>
<html>
<head>
	<title>金融理财专区</title>

<meta charset="utf-8">


<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>



<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>


<style type="text/css">
	
	.tab1{
    width: 48.9%;
    height: 48px;
    text-align: center;
    line-height: 48px;
    display: inline-block;
    position: absolute;
    color: #000;
	}
	.tab_choose{
		background-color: #F43443;
	    color: #fff;
	    font-size: 14px;
	}
	.div{
		background-color: #fff;
	}
	.line{
		display: inline-block;
	}
    .list_outer_div{
        margin: 12px;background-color: #FFFFFF;box-shadow: 0px 2px 4px 0px rgba(38,1,1,0.30);height: 151px;position: relative;
    }
    .list_name{
        border-bottom: 1px solid #f5f5f5;
    }
    .list_name_p{
         display: inline-block;
    font-size: 18px;
    color: #333;
    margin-left: 12px;
    margin-top: 8px;
    }
    .list_name_right{
           display: inline-block;
    right: 0px;
    position: absolute;
    font-size: 14px;
    color: #40BBFF;
    margin-top: 10px;
    margin-right: 10px;
    }
    .list_text_img{
            top: 59px;
    position: absolute;
    left: 12px;
    }
    .list_text_img img{
        width: 60px;height: 60px;background-color: #FFEFF0;
    }
    .list_text_centent{
          position: absolute;
    left: 90px;
    margin-top: 21px;
    line-height: 9px;
    }
    .list_text_centent_p1{
        font-size: 14px;   
    }
    .list_text_centent_p2{
            font-size: 12px;
    color: #666;
    }
    .list_text_centent_p3{
        font-size: 14px;   
    }

    .list_text_right_div{
            position: absolute;
    right: 10px;
    margin-top: 15px;
    }
    .list_text_right_div_p1{
         font-size: 36px;
    color: #F43443;
    line-height: 36px;
    }
    .list_text_right_div_p2{
          font-size: 12px;
    color: #999999;
    margin-top: -9px;
    text-align: right;
    margin-right: 9px;
    }
    .line_p_hint{
         position: absolute;
    bottom: 0px;
    padding-left: 12px;
    font-size: 14px;
    padding-bottom: 0px;
    height: 23px;
    width: 100%;
    background-color: #FFEFF0;
    border: #666666;
    font-size: 12px;
    line-height: 25px;
    }

    .banner_div{
         /*height: 100px;*/
    background-color: #FFEFF0;
    }
    .banner_div img{
        width: 100%;
            margin-bottom: 7px;
    }
    .tab_div{
        height: 48px;background-color: #fff;"

    }
    .tab_hint{
        font-size: 16px;color: #666;
    }
</style>




    <meta name="format-detection" content="telephone=no">
    <meta name="format-detection" content="email=no">
    <meta name="format-detection" content="address=no">

    <meta name="description" content="没钱就找我，这里有你需要的">
    <meta name="keywords" content="贷款，金融，聚宝">


    <meta itemprop="name" content="金融贷"/>
    <meta itemprop="image" content="http://avatar.csdn.net/3/7/2/1_lixld.jpg" />
    <meta name="description" itemprop="description" content="没钱就找我，1分钟到账，马上领取" />
    <meta itemprop="wx_circle" content="没钱就找我，1分钟到账，马上找我" />


<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?e2635c247fc9ffaa38548d33fe54bc8d";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>




</head>
<body style="  background-color: #f5f5f5;">



<div class="banner_div">
</div>
<div class="tab_div">
	<div class="tab1 tab_choose" style="left: 0px;" onclick="onTabClick(this,1);">急速贷</div>
	<div class="tab1" style="right:0px;"  onclick="onTabClick(this,2);">大额贷</div>
</div>
<!-- <div><div></div><p>申请多个产品，可大幅提高贷款成功率</p></div> -->
<div class="div" style="margin-top: 2px;">
<img class="line" style="margin: 9px 12px;" src="/basic/mobile/img/page_top.png">
<p class="line tab_hint">申请多个产品，可大幅度提高贷款成功率</p>
</div>


<div id="container">






</div>

</body>



<script type="text/javascript">


String.prototype.format = function()
{
    var args = arguments;
    return this.replace(/\{(\d+)\}/g,                
        function(m,i){
            return args[i];
        });
}

        $.ajax({
          type: "get",
          url: "/basic/web/index.php?r=mobie/bannermajax",
          data: { name: "John", location: "Boston" }
        }).done(function( msg ) {
          // console.log(msg);
            msg = JSON.parse(msg);

            $(".banner_div").append("<a href='{1}'><img src='{0}'></a>".format(msg[0].banner_image,msg[0].gotourl));
            $(".tab_hint").html(msg[0].notice);
        });






var current_tab = 1;

var tab1_html = "";
var tab2_html = "";

	function onTabClick(node,tab) {
		
		current_tab = tab;
		$($(".tab1")[0]).removeClass("tab_choose");
		$($(".tab1")[1]).removeClass("tab_choose");

		$(node).addClass("tab_choose");


		if (current_tab == 1){
			$("#container").empty();
			$("#container").append(tab1_html);
		}


		if (current_tab == 2){
			$("#container").empty();
			$("#container").append(tab2_html);
		}

        get_data();
	}

var tab1_html_load = false;
var tab2_html_load = false;
function get_data(){

if(tab1_html_load && current_tab ==1){
    return;
}

if (!tab1_html_load  || !tab2_html_load ) {
        $.ajax({
          type: "get",
          url: "/basic/web/index.php?r=mobie/ajax&tab="+current_tab,
          data: { name: "John", location: "Boston" }
        }).done(function( msg ) {
          // console.log(msg);

        msg = JSON.parse(msg);

        for (var i = 0; i < msg.length; i++) {
            info = msg[i];
            var html_str = '<div class="list_outer_div" onclick="openurl(\'{7}\',\'{9}\');">'
            +'<div class="list_name"><p class="list_name_p">{0}</p><p class="list_name_right">申请贷款 &gt;</p></div>'
            +'<div>'
            +    '<div class="line list_text_img ">'
            +        '<img src="{1}" >'
            +    '</div>'
            +    '<div class="line list_text_centent">'
            +        '<p class="list_text_centent_p1">{2}</p>'
            +        '<p class="list_text_centent_p2">{8}：{3}</p>'
            +        '<p class="list_text_centent_p2">申请人数：{4}</p>'
            +    '</div>'
            +    '<div class="line list_text_right_div" >'
            +        '<p class="list_text_right_div_p1">¥{5}</p>'
            +        '<p class="list_text_right_div_p2">可贷额度</p>'
            +    '</div></div>'
            +'<div class="line_p_hint">'
            +    '<p>{6}</p>'
            +'</div></div>';

            html_str = html_str.format(info.order_name,info.order_image,info.order_desc,info.order_day_rate,parseInt(info.order_num)*(Math.random()+1)|0,info.order_money,info.order_hint_name,info.order_goto_url,info.order_rate_name,info.order_name);

            if (current_tab == 1) {
                tab1_html +=html_str;
            }else{
                tab2_html +=html_str;
            }

        }

        if (current_tab == 1) {
                $("#container").append(tab1_html);
                tab1_html_load = true;
                
            }else{
                $("#container").append(tab2_html);
                tab2_html_load = true;
            }

        });

}



}


get_data();

function openurl(url,order_name) {
    
    _hmt.push(['_setCustomVar', 1, order_name, 'click', 1]);

    window.location.href = url;
}








</script>


</html>
